package com.baor.dao;

import com.baor.domain.ManageVo;
import com.github.yulichang.base.mapper.MPJJoinMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public interface ManageDao extends MPJJoinMapper<ManageVo> {
    Integer getData(String sql);

    @Select("SELECT DATE_FORMAT(finance_createtime, '%Y-%m-%d') as day,count(*) as count from t_finance group by day order by day desc limit 7")
    List<Map<String,Object>> sevenData();

    @Select("select finance_pays as pay,count(*) as count from t_finance group by finance_pays")
    List<Map<String, Object>> paysData();
}
